From: Marco Trevisan (TreviƱo) Date: Fri, 3 Aug 2018 17:06:47 +0000 (+0200) Subject: st/scroll-view: Remove scrollbars references on dispose X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~486 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aa9031d8e7692e41b442534a2e473ef4f2f67f14;p=gnome-shell.git st/scroll-view: Remove scrollbars references on dispose As we're destroying the scrollbars on destruction, we should remove any reference of it, not to cause multiple-calls to disposal to unreference them again. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/190 --- diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c index 029e4a356..79af3ca13 100644 --- a/src/st/st-scroll-view.c +++ b/src/st/st-scroll-view.c @@ -250,11 +250,8 @@ st_scroll_view_dispose (GObject *object) priv->fade_effect = NULL; } - if (priv->vscroll) - clutter_actor_destroy (priv->vscroll); - - if (priv->hscroll) - clutter_actor_destroy (priv->hscroll); + g_clear_pointer (&priv->vscroll, clutter_actor_destroy); + g_clear_pointer (&priv->hscroll, clutter_actor_destroy); /* For most reliable freeing of memory, an object with signals * like StAdjustment should be explicitly disposed. Since we own